*compute vignette equivalence for eu vignettes

use "eu_vignettes.dta" 

drop if party_A ==.
drop if party_B == .
drop if party_C == .

*number of true orderings
gen correct = 1 if party_B > party_C & party_C > party_A

*number of orderings where B = C
replace correct = 2 if party_B == party_C & party_C > party_A

*number of orderings where C = A
replace correct = 3 if party_B > party_C & party_C == party_A

*number of incorrect orderings
replace correct = 4 if correct == .

*create counts and percentages for latex table
tab correct

/*To make the descriptive table, we created a LaTeX table directly in the .tex file.

\begin{table}[htp]{\caption{\label{t:vig}Vignette Equivalence among the Experts}}
\begin{center}
\begin{tabular}{lcD{.}{.}{4.4}}
\multicolumn{3}{c}{EU Vignette Equivalence}\\
\multicolumn{3}{c}{(Correct ordering $A<C<B$)}\\

\hline
Ordering 	& Frequency	&\multicolumn{1}{c}{Proportion}\\
$A<C<B$	& 238	&82.9\%\\
$A<C=B$ &16		&5.6\%\\
$A=C<B$	&6		&2.1\%\\
Correct	&260		&90.6\%\\
Incorrect	&27		&9.4\%\\
\hline
\hline
\multicolumn{3}{c}{GAL-TAN Vignette Equivalence}\\
\multicolumn{3}{c}{(Correct ordering $A<B<C$)}\\
Ordering 	& Frequency	&\multicolumn{1}{c}{Proportion}\\
$A<B<C$	& 276	&95.5\%\\
$A<B=C$ &0		&0.0\%\\
$A=B<C$	&6		&2.1\%\\
Correct	&282		&97.6\%\\
Incorrect	&7		&2.4\%\\
\hline
\end{tabular}
\end{center}
\end{table}

